home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / PROBLEMS / BENCHMARK / ARMSI346 / !ArmSI / Bits / Flops20 next >
Text File  |  1993-07-27  |  8KB  |  162 lines

  1.  
  2.    I have finally revised the flops.c program to version 2.0 which
  3.    addresses the concerns brought out over the last year or so (version
  4.    1.2c and earliar versions). Below is a discussion of the new flops.c
  5.    program (flops20.c) and some results for the HP 9000/730 and IBM
  6.    RS/6000 Model 550 systems.
  7.  
  8.    Flops.c is a 'c' program which attempts to estimate your systems
  9.    floating-point 'MFLOPS' rating for the FADD, FSUB, FMUL, and FDIV
  10.    operations based on specific 'instruction mixes' (discussed below).
  11.    The program provides an estimate of PEAK MFLOPS performance by making
  12.    maximal use of register variables with minimal interaction with main
  13.    memory. The execution loops are all small so that they will fit in
  14.    any cache. Flops.c can be used along with Linpack and the Livermore
  15.    kernels (which exercise memory much more extensively) to gain further
  16.    insight into the limits of system performance. The flops.c execution
  17.    modules include various percent weightings of FDIV's (from 0% to 25%
  18.    FDIV's) so that the range of performance can be obtained when using
  19.    FDIV's. FDIV's, being computationally more intensive than FADD's or
  20.    FMUL's, can impact performance considerably on some systems.
  21.    
  22.    Flops.c consists of 8 independent 'modules' which, except for module
  23.    2, conduct numerical integration of various functions. Some of the
  24.    functions (sin(x) and cos(x)) are approximated using a power series
  25.    expansion accurate to 1.0e-14 over the integration interval. Module 2,
  26.    estimates the value of pi based upon the Maclaurin series expansion of
  27.    atan(1). MFLOPS ratings are provided for each module, but the programs
  28.    overall results are summerized by the MFLOPS(1), MFLOPS(2), MFLOPS(3),
  29.    and MFLOPS(4) outputs.
  30.  
  31.    The MFLOPS(1) result is identical to the result provided by all
  32.    previous versions of flops.c (flops12c.c and earliar versions). It is
  33.    based only upon the results from modules 2 and 3. Actually, on faster
  34.    machines, MFLOPS(1) from flops.c V2.0 is expected to provide more
  35.    accurate results since the number of iterations conducted (which is
  36.    reflected in the timing accuracy) is more tightly controlled than in
  37.    previous versions of flops.c.
  38.    
  39.    Two problems surfaced in using MFLOPS(1). First, it was difficult to
  40.    completely 'vectorize' the result due to the recurrence of the 's'
  41.    variable in module 2. This problem is addressed in the MFLOPS(2) result
  42.    which does not use module 2, but maintains nearly the same weighting of
  43.    FDIV's (9.2%) as in MFLOPS(1) (9.6%). For scalar machines the MFLOPS(2)
  44.    results 'should' be similar to the MFLOPS(1) results. However, for
  45.    vector machines the MFLOPS(1) and MFLOPS(2) results may differ
  46.    considerably since the MFLOPS(2) result is expected to be more
  47.    completely vectorizable. The second problem with MFLOPS(1) centers
  48.    around the percentage of FDIV's (9.6%) which was viewed as too high for
  49.    an important class of problems. This concern is addressed in the
  50.    MFLOPS(3) result which does only 3.4% FDIV's, and the MFLOPS(4) result
  51.    where NO FDIV's are conducted at all.
  52.    
  53.    The number of floating-point instructions per iteration (loop) is
  54.    given below for each module executed.
  55.  
  56.    MODULE   FADD   FSUB   FMUL   FDIV   TOTAL  Comment
  57.      1        7      0      6      1      14   7.1%  FDIV's
  58.      2        3      2      1      1       7   difficult to vectorize.
  59.      3        6      2      9      0      17   0.0%  FDIV's
  60.      4        7      0      8      0      15   0.0%  FDIV's
  61.      5       13      0     15      1      29   3.4%  FDIV's
  62.      6       13      0     16      0      29   0.0%  FDIV's
  63.      7        3      3      3      3      12   25.0% FDIV's
  64.      8       13      0     17      0      30   0.0%  FDIV's
  65.    
  66.    A*2+3     21     12     14      5      52   A=5, MFLOPS(1), Same as
  67.             40.4%  23.1%  26.9%  9.6%          previous versions of the
  68.                                                flops.c program. Includes
  69.                                                only Modules 2 and 3.
  70.    
  71.    1+3+4     58     14     66     14     152   A=4, MFLOPS(2), New output
  72.    +5+6+    38.2%  9.2%   43.4%  9.2%          does not include Module 2,
  73.    A*7                                         but does 9.2% FDIV's.
  74.    
  75.    1+3+4     62      5     74      5     146   A=0, MFLOPS(3), New output
  76.    +5+6+    42.5%  3.4%   50.7%  3.4%          does not include Module 2,
  77.    7+8                                         but does 3.4% FDIV's.
  78.  
  79.    3+4+6     39      2     50      0      91   A=0, MFLOPS(4), New output
  80.    +8       42.9%  2.2%   54.9%  0.0%          does not include Module 2,
  81.                                                and does NO FDIV's.
  82.  
  83.    I hope that flops.c V2.0 (flops20.c) proves more useful than earliar
  84.    versions.
  85.  
  86.  
  87. (1) HP 9000/730 flops.c V2.0 Results, cc +OS +O3 -W1-a,archive   
  88.  
  89.    Below are the HP 9000/730 results (provided by Bo Thide'). The minimum
  90.    MFLOPS rating is 15.1 MFLOPS for module 7, which does 25% FDIV's. The
  91.    maximum MFLOPS rating is 37.1 MFLOPS for module 6, which does 0.0%
  92.    FDIV's. FDIV appears to be reasonably efficient on the HP 9000/730,
  93.    as indicated by the overall MFLOPS(n) outputs. 
  94.  
  95.    The 'Runtime' output is the time in microseconds (usec) for one
  96.    iteration (loop) through the module. The MFLOPS rating is obtained by
  97.    dividing the number of floating-point instructions in the loop by the
  98.    Runtime (in microseconds). For example for module 1 below:
  99.    MFLOPS = 14.0 / 0.5978 = 23.42.
  100.  
  101.    The Runtime output has already been adjusted for an estimate of the
  102.    time in microseconds to conduct one empty 'for' loop (NullTime). If
  103.    NullTime is not calculated (that is, NullTime = 0.0), due to compiler
  104.    optimization, it can produce a 3% to 5% lower MFLOPS rating than would
  105.    otherwise be obtained.
  106.  
  107.  
  108.    FLOPS C Program (Double Precision), V2.0 18 Dec 1992
  109.  
  110.    Module     Error        RunTime      MFLOPS
  111.                             (usec)
  112.      1     -4.6896e-13      0.5978     23.4187
  113.      2      2.2160e-13      0.2447     28.6079
  114.      3     -6.9944e-15      0.7412     22.9342
  115.      4     -9.7256e-14      0.6906     21.7195
  116.      5     -1.6542e-14      0.9200     31.5217
  117.      6      4.3632e-14      0.7822     37.0755
  118.      7     -4.9454e-11      0.7972     15.0529
  119.      8      7.2164e-14      0.8275     36.2538
  120.  
  121.    Iterations      =   32000000
  122.    NullTime (usec) =     0.0306
  123.    MFLOPS(1)       =    26.4673  [same as flops12c.c, 9.6% FDIV's]
  124.    MFLOPS(2)       =    21.9633  [9.2% FDIV's]
  125.    MFLOPS(3)       =    27.2566  [3.4% FDIV's]
  126.    MFLOPS(4)       =    29.9188  [0.0% FDIV's]
  127.  
  128.  
  129. (2) IBM RS/6000 Model 550 flops.c V2.0 results, cc -DUNIX -O -Q
  130.  
  131.    The IBM RS/6000 Model 550 flops20.c results are shown below. Here,
  132.    the minimum MFLOPS rating is 7.3 MFLOPS also for module 7 which does
  133.    25.0% FDIV's. The maximum MFLOPS rating is 56.9 MFLOPS (!) also for
  134.    module 6 which does 0.0% FDIV's. While the Model 550 works wonders
  135.    with FADD's and FMULS's its performance falls off rapidly with FDIV's.
  136.  
  137.  
  138.    FLOPS C Program (Double Precision), V2.0 18 Dec 1992
  139.  
  140.    Module     Error        RunTime      MFLOPS
  141.                             (usec)
  142.      1     -4.6896e-13      0.7028     19.9200
  143.      2      2.2160e-13      0.5806     12.0560
  144.      3     -7.0499e-15      0.4372     38.8849
  145.      4     -9.7145e-14      0.4359     34.4086
  146.      5     -1.6542e-14      0.9903     29.2837
  147.      6      4.3632e-14      0.5100     56.8627
  148.      7     -4.9454e-11      1.6456      7.2921
  149.      8      7.2164e-14      0.5572     53.8418
  150.  
  151.    Iterations      =   32000000
  152.    NullTime (usec) =     0.0484
  153.    MFLOPS(1)       =    15.5674  [same as flops12c.c, 9.6% FDIV's]
  154.    MFLOPS(2)       =    15.7370  [9.2% FDIV's]
  155.    MFLOPS(3)       =    27.6568  [3.4% FDIV's]
  156.    MFLOPS(4)       =    46.8997  [0.0% FDIV's]
  157.  
  158. Al Aburto
  159. aburto@marlin.nosc.mil
  160.  
  161.  
  162.